
/**
 * This is a generated class and is not intended for modification.  
 */
package com.model.valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _VoAmendHeaderEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("total_qty", "po_closed_date", "pro_tax", "cre_userid_fk", "po_remarks", "po_amend_serialnumber", "unit_price", "po_amend_detserialnumber", "po_issue_date", "pro_qty", "activestatus", "total_amt", "enq_serialnumber_fk", "po_serialnumber_fk", "po_amend_serialnumber_fk", "cre_datetime", "po_status", "pro_total_price", "supplier_serialnumber_fk", "pro_serialnumber_fk", "discount", "expected_datetime", "pro_discount", "tax", "po_amend_id", "shipment_charge", "enq_amend_po_serialnumber");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("total_qty", "po_closed_date", "pro_tax", "cre_userid_fk", "po_remarks", "po_amend_serialnumber", "unit_price", "po_amend_detserialnumber", "po_issue_date", "pro_qty", "activestatus", "total_amt", "enq_serialnumber_fk", "po_serialnumber_fk", "po_amend_serialnumber_fk", "cre_datetime", "po_status", "pro_total_price", "supplier_serialnumber_fk", "pro_serialnumber_fk", "discount", "expected_datetime", "pro_discount", "tax", "po_amend_id", "shipment_charge", "enq_amend_po_serialnumber");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("total_qty", "po_closed_date", "pro_tax", "cre_userid_fk", "po_remarks", "po_amend_serialnumber", "unit_price", "po_amend_detserialnumber", "po_issue_date", "pro_qty", "activestatus", "total_amt", "enq_serialnumber_fk", "po_serialnumber_fk", "po_amend_serialnumber_fk", "cre_datetime", "po_status", "pro_total_price", "supplier_serialnumber_fk", "pro_serialnumber_fk", "discount", "expected_datetime", "pro_discount", "tax", "po_amend_id", "shipment_charge", "enq_amend_po_serialnumber");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("total_qty", "po_closed_date", "pro_tax", "cre_userid_fk", "po_remarks", "po_amend_serialnumber", "unit_price", "po_amend_detserialnumber", "po_issue_date", "pro_qty", "activestatus", "total_amt", "enq_serialnumber_fk", "po_serialnumber_fk", "po_amend_serialnumber_fk", "cre_datetime", "po_status", "pro_total_price", "supplier_serialnumber_fk", "pro_serialnumber_fk", "discount", "expected_datetime", "pro_discount", "tax", "po_amend_id", "shipment_charge", "enq_amend_po_serialnumber");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array("pro_tax", "unit_price", "po_amend_detserialnumber", "pro_qty", "enq_serialnumber_fk", "po_amend_serialnumber_fk", "pro_total_price", "pro_serialnumber_fk", "pro_discount", "enq_amend_po_serialnumber");
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "VoAmendHeader";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();

    
    model_internal var _po_closed_dateIsValid:Boolean;
    model_internal var _po_closed_dateValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _po_closed_dateIsValidCacheInitialized:Boolean = false;
    model_internal var _po_closed_dateValidationFailureMessages:Array;
    
    model_internal var _pro_taxIsValid:Boolean;
    model_internal var _pro_taxValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_taxIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_taxValidationFailureMessages:Array;
    
    model_internal var _po_remarksIsValid:Boolean;
    model_internal var _po_remarksValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _po_remarksIsValidCacheInitialized:Boolean = false;
    model_internal var _po_remarksValidationFailureMessages:Array;
    
    model_internal var _unit_priceIsValid:Boolean;
    model_internal var _unit_priceValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _unit_priceIsValidCacheInitialized:Boolean = false;
    model_internal var _unit_priceValidationFailureMessages:Array;
    
    model_internal var _po_amend_detserialnumberIsValid:Boolean;
    model_internal var _po_amend_detserialnumberValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _po_amend_detserialnumberIsValidCacheInitialized:Boolean = false;
    model_internal var _po_amend_detserialnumberValidationFailureMessages:Array;
    
    model_internal var _po_issue_dateIsValid:Boolean;
    model_internal var _po_issue_dateValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _po_issue_dateIsValidCacheInitialized:Boolean = false;
    model_internal var _po_issue_dateValidationFailureMessages:Array;
    
    model_internal var _pro_qtyIsValid:Boolean;
    model_internal var _pro_qtyValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_qtyIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_qtyValidationFailureMessages:Array;
    
    model_internal var _enq_serialnumber_fkIsValid:Boolean;
    model_internal var _enq_serialnumber_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _enq_serialnumber_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _enq_serialnumber_fkValidationFailureMessages:Array;
    
    model_internal var _po_amend_serialnumber_fkIsValid:Boolean;
    model_internal var _po_amend_serialnumber_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _po_amend_serialnumber_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _po_amend_serialnumber_fkValidationFailureMessages:Array;
    
    model_internal var _cre_datetimeIsValid:Boolean;
    model_internal var _cre_datetimeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _cre_datetimeIsValidCacheInitialized:Boolean = false;
    model_internal var _cre_datetimeValidationFailureMessages:Array;
    
    model_internal var _po_statusIsValid:Boolean;
    model_internal var _po_statusValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _po_statusIsValidCacheInitialized:Boolean = false;
    model_internal var _po_statusValidationFailureMessages:Array;
    
    model_internal var _pro_total_priceIsValid:Boolean;
    model_internal var _pro_total_priceValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_total_priceIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_total_priceValidationFailureMessages:Array;
    
    model_internal var _pro_serialnumber_fkIsValid:Boolean;
    model_internal var _pro_serialnumber_fkValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_serialnumber_fkIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_serialnumber_fkValidationFailureMessages:Array;
    
    model_internal var _expected_datetimeIsValid:Boolean;
    model_internal var _expected_datetimeValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _expected_datetimeIsValidCacheInitialized:Boolean = false;
    model_internal var _expected_datetimeValidationFailureMessages:Array;
    
    model_internal var _pro_discountIsValid:Boolean;
    model_internal var _pro_discountValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _pro_discountIsValidCacheInitialized:Boolean = false;
    model_internal var _pro_discountValidationFailureMessages:Array;
    
    model_internal var _po_amend_idIsValid:Boolean;
    model_internal var _po_amend_idValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _po_amend_idIsValidCacheInitialized:Boolean = false;
    model_internal var _po_amend_idValidationFailureMessages:Array;
    
    model_internal var _enq_amend_po_serialnumberIsValid:Boolean;
    model_internal var _enq_amend_po_serialnumberValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _enq_amend_po_serialnumberIsValidCacheInitialized:Boolean = false;
    model_internal var _enq_amend_po_serialnumberValidationFailureMessages:Array;

    model_internal var _instance:_Super_VoAmendHeader;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _VoAmendHeaderEntityMetadata(value : _Super_VoAmendHeader)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // depenents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["total_qty"] = new Array();
            model_internal::dependentsOnMap["po_closed_date"] = new Array();
            model_internal::dependentsOnMap["pro_tax"] = new Array();
            model_internal::dependentsOnMap["cre_userid_fk"] = new Array();
            model_internal::dependentsOnMap["po_remarks"] = new Array();
            model_internal::dependentsOnMap["po_amend_serialnumber"] = new Array();
            model_internal::dependentsOnMap["unit_price"] = new Array();
            model_internal::dependentsOnMap["po_amend_detserialnumber"] = new Array();
            model_internal::dependentsOnMap["po_issue_date"] = new Array();
            model_internal::dependentsOnMap["pro_qty"] = new Array();
            model_internal::dependentsOnMap["activestatus"] = new Array();
            model_internal::dependentsOnMap["total_amt"] = new Array();
            model_internal::dependentsOnMap["enq_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["po_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["po_amend_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["cre_datetime"] = new Array();
            model_internal::dependentsOnMap["po_status"] = new Array();
            model_internal::dependentsOnMap["pro_total_price"] = new Array();
            model_internal::dependentsOnMap["supplier_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["pro_serialnumber_fk"] = new Array();
            model_internal::dependentsOnMap["discount"] = new Array();
            model_internal::dependentsOnMap["expected_datetime"] = new Array();
            model_internal::dependentsOnMap["pro_discount"] = new Array();
            model_internal::dependentsOnMap["tax"] = new Array();
            model_internal::dependentsOnMap["po_amend_id"] = new Array();
            model_internal::dependentsOnMap["shipment_charge"] = new Array();
            model_internal::dependentsOnMap["enq_amend_po_serialnumber"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object()
            model_internal::collectionBaseMap["pro_tax"] = "Number";
            model_internal::collectionBaseMap["unit_price"] = "Number";
            model_internal::collectionBaseMap["po_amend_detserialnumber"] = "int";
            model_internal::collectionBaseMap["pro_qty"] = "int";
            model_internal::collectionBaseMap["enq_serialnumber_fk"] = "int";
            model_internal::collectionBaseMap["po_amend_serialnumber_fk"] = "int";
            model_internal::collectionBaseMap["pro_total_price"] = "Number";
            model_internal::collectionBaseMap["pro_serialnumber_fk"] = "int";
            model_internal::collectionBaseMap["pro_discount"] = "Number";
            model_internal::collectionBaseMap["enq_amend_po_serialnumber"] = "int";
        }

        model_internal::_instance = value;
        model_internal::_po_closed_dateValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPo_closed_date);
        model_internal::_po_closed_dateValidator.required = true;
        model_internal::_po_closed_dateValidator.requiredFieldError = "po_closed_date is required";
        //model_internal::_po_closed_dateValidator.source = model_internal::_instance;
        //model_internal::_po_closed_dateValidator.property = "po_closed_date";
        model_internal::_pro_taxValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_tax);
        model_internal::_pro_taxValidator.required = true;
        model_internal::_pro_taxValidator.requiredFieldError = "pro_tax is required";
        //model_internal::_pro_taxValidator.source = model_internal::_instance;
        //model_internal::_pro_taxValidator.property = "pro_tax";
        model_internal::_po_remarksValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPo_remarks);
        model_internal::_po_remarksValidator.required = true;
        model_internal::_po_remarksValidator.requiredFieldError = "po_remarks is required";
        //model_internal::_po_remarksValidator.source = model_internal::_instance;
        //model_internal::_po_remarksValidator.property = "po_remarks";
        model_internal::_unit_priceValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForUnit_price);
        model_internal::_unit_priceValidator.required = true;
        model_internal::_unit_priceValidator.requiredFieldError = "unit_price is required";
        //model_internal::_unit_priceValidator.source = model_internal::_instance;
        //model_internal::_unit_priceValidator.property = "unit_price";
        model_internal::_po_amend_detserialnumberValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPo_amend_detserialnumber);
        model_internal::_po_amend_detserialnumberValidator.required = true;
        model_internal::_po_amend_detserialnumberValidator.requiredFieldError = "po_amend_detserialnumber is required";
        //model_internal::_po_amend_detserialnumberValidator.source = model_internal::_instance;
        //model_internal::_po_amend_detserialnumberValidator.property = "po_amend_detserialnumber";
        model_internal::_po_issue_dateValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPo_issue_date);
        model_internal::_po_issue_dateValidator.required = true;
        model_internal::_po_issue_dateValidator.requiredFieldError = "po_issue_date is required";
        //model_internal::_po_issue_dateValidator.source = model_internal::_instance;
        //model_internal::_po_issue_dateValidator.property = "po_issue_date";
        model_internal::_pro_qtyValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_qty);
        model_internal::_pro_qtyValidator.required = true;
        model_internal::_pro_qtyValidator.requiredFieldError = "pro_qty is required";
        //model_internal::_pro_qtyValidator.source = model_internal::_instance;
        //model_internal::_pro_qtyValidator.property = "pro_qty";
        model_internal::_enq_serialnumber_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForEnq_serialnumber_fk);
        model_internal::_enq_serialnumber_fkValidator.required = true;
        model_internal::_enq_serialnumber_fkValidator.requiredFieldError = "enq_serialnumber_fk is required";
        //model_internal::_enq_serialnumber_fkValidator.source = model_internal::_instance;
        //model_internal::_enq_serialnumber_fkValidator.property = "enq_serialnumber_fk";
        model_internal::_po_amend_serialnumber_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPo_amend_serialnumber_fk);
        model_internal::_po_amend_serialnumber_fkValidator.required = true;
        model_internal::_po_amend_serialnumber_fkValidator.requiredFieldError = "po_amend_serialnumber_fk is required";
        //model_internal::_po_amend_serialnumber_fkValidator.source = model_internal::_instance;
        //model_internal::_po_amend_serialnumber_fkValidator.property = "po_amend_serialnumber_fk";
        model_internal::_cre_datetimeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForCre_datetime);
        model_internal::_cre_datetimeValidator.required = true;
        model_internal::_cre_datetimeValidator.requiredFieldError = "cre_datetime is required";
        //model_internal::_cre_datetimeValidator.source = model_internal::_instance;
        //model_internal::_cre_datetimeValidator.property = "cre_datetime";
        model_internal::_po_statusValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPo_status);
        model_internal::_po_statusValidator.required = true;
        model_internal::_po_statusValidator.requiredFieldError = "po_status is required";
        //model_internal::_po_statusValidator.source = model_internal::_instance;
        //model_internal::_po_statusValidator.property = "po_status";
        model_internal::_pro_total_priceValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_total_price);
        model_internal::_pro_total_priceValidator.required = true;
        model_internal::_pro_total_priceValidator.requiredFieldError = "pro_total_price is required";
        //model_internal::_pro_total_priceValidator.source = model_internal::_instance;
        //model_internal::_pro_total_priceValidator.property = "pro_total_price";
        model_internal::_pro_serialnumber_fkValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_serialnumber_fk);
        model_internal::_pro_serialnumber_fkValidator.required = true;
        model_internal::_pro_serialnumber_fkValidator.requiredFieldError = "pro_serialnumber_fk is required";
        //model_internal::_pro_serialnumber_fkValidator.source = model_internal::_instance;
        //model_internal::_pro_serialnumber_fkValidator.property = "pro_serialnumber_fk";
        model_internal::_expected_datetimeValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForExpected_datetime);
        model_internal::_expected_datetimeValidator.required = true;
        model_internal::_expected_datetimeValidator.requiredFieldError = "expected_datetime is required";
        //model_internal::_expected_datetimeValidator.source = model_internal::_instance;
        //model_internal::_expected_datetimeValidator.property = "expected_datetime";
        model_internal::_pro_discountValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPro_discount);
        model_internal::_pro_discountValidator.required = true;
        model_internal::_pro_discountValidator.requiredFieldError = "pro_discount is required";
        //model_internal::_pro_discountValidator.source = model_internal::_instance;
        //model_internal::_pro_discountValidator.property = "pro_discount";
        model_internal::_po_amend_idValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPo_amend_id);
        model_internal::_po_amend_idValidator.required = true;
        model_internal::_po_amend_idValidator.requiredFieldError = "po_amend_id is required";
        //model_internal::_po_amend_idValidator.source = model_internal::_instance;
        //model_internal::_po_amend_idValidator.property = "po_amend_id";
        model_internal::_enq_amend_po_serialnumberValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForEnq_amend_po_serialnumber);
        model_internal::_enq_amend_po_serialnumberValidator.required = true;
        model_internal::_enq_amend_po_serialnumberValidator.requiredFieldError = "enq_amend_po_serialnumber is required";
        //model_internal::_enq_amend_po_serialnumberValidator.source = model_internal::_instance;
        //model_internal::_enq_amend_po_serialnumberValidator.property = "enq_amend_po_serialnumber";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::dataProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity VoAmendHeader");  
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity VoAmendHeader");  

        return model_internal::collectionBaseMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VoAmendHeader");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::dataProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a data property of entity VoAmendHeader");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity VoAmendHeader");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isTotal_qtyAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPo_closed_dateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_taxAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCre_userid_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPo_remarksAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPo_amend_serialnumberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isUnit_priceAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPo_amend_detserialnumberAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPo_issue_dateAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_qtyAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isActivestatusAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTotal_amtAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isEnq_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPo_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPo_amend_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isCre_datetimeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPo_statusAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_total_priceAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSupplier_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_serialnumber_fkAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isDiscountAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isExpected_datetimeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPro_discountAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isTaxAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPo_amend_idAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isShipment_chargeAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isEnq_amend_po_serialnumberAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnPo_closed_date():void
    {
        if (model_internal::_po_closed_dateIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPo_closed_date = null;
            model_internal::calculatePo_closed_dateIsValid();
        }
    }
    public function invalidateDependentOnPro_tax():void
    {
        if (model_internal::_pro_taxIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_tax = null;
            model_internal::calculatePro_taxIsValid();
        }
    }
    public function invalidateDependentOnPo_remarks():void
    {
        if (model_internal::_po_remarksIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPo_remarks = null;
            model_internal::calculatePo_remarksIsValid();
        }
    }
    public function invalidateDependentOnUnit_price():void
    {
        if (model_internal::_unit_priceIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfUnit_price = null;
            model_internal::calculateUnit_priceIsValid();
        }
    }
    public function invalidateDependentOnPo_amend_detserialnumber():void
    {
        if (model_internal::_po_amend_detserialnumberIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPo_amend_detserialnumber = null;
            model_internal::calculatePo_amend_detserialnumberIsValid();
        }
    }
    public function invalidateDependentOnPo_issue_date():void
    {
        if (model_internal::_po_issue_dateIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPo_issue_date = null;
            model_internal::calculatePo_issue_dateIsValid();
        }
    }
    public function invalidateDependentOnPro_qty():void
    {
        if (model_internal::_pro_qtyIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_qty = null;
            model_internal::calculatePro_qtyIsValid();
        }
    }
    public function invalidateDependentOnEnq_serialnumber_fk():void
    {
        if (model_internal::_enq_serialnumber_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfEnq_serialnumber_fk = null;
            model_internal::calculateEnq_serialnumber_fkIsValid();
        }
    }
    public function invalidateDependentOnPo_amend_serialnumber_fk():void
    {
        if (model_internal::_po_amend_serialnumber_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPo_amend_serialnumber_fk = null;
            model_internal::calculatePo_amend_serialnumber_fkIsValid();
        }
    }
    public function invalidateDependentOnCre_datetime():void
    {
        if (model_internal::_cre_datetimeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfCre_datetime = null;
            model_internal::calculateCre_datetimeIsValid();
        }
    }
    public function invalidateDependentOnPo_status():void
    {
        if (model_internal::_po_statusIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPo_status = null;
            model_internal::calculatePo_statusIsValid();
        }
    }
    public function invalidateDependentOnPro_total_price():void
    {
        if (model_internal::_pro_total_priceIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_total_price = null;
            model_internal::calculatePro_total_priceIsValid();
        }
    }
    public function invalidateDependentOnPro_serialnumber_fk():void
    {
        if (model_internal::_pro_serialnumber_fkIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_serialnumber_fk = null;
            model_internal::calculatePro_serialnumber_fkIsValid();
        }
    }
    public function invalidateDependentOnExpected_datetime():void
    {
        if (model_internal::_expected_datetimeIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfExpected_datetime = null;
            model_internal::calculateExpected_datetimeIsValid();
        }
    }
    public function invalidateDependentOnPro_discount():void
    {
        if (model_internal::_pro_discountIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPro_discount = null;
            model_internal::calculatePro_discountIsValid();
        }
    }
    public function invalidateDependentOnPo_amend_id():void
    {
        if (model_internal::_po_amend_idIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPo_amend_id = null;
            model_internal::calculatePo_amend_idIsValid();
        }
    }
    public function invalidateDependentOnEnq_amend_po_serialnumber():void
    {
        if (model_internal::_enq_amend_po_serialnumberIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfEnq_amend_po_serialnumber = null;
            model_internal::calculateEnq_amend_po_serialnumberIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get total_qtyStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get po_closed_dateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get po_closed_dateValidator() : StyleValidator
    {
        return model_internal::_po_closed_dateValidator;
    }

    model_internal function set _po_closed_dateIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_po_closed_dateIsValid;         
        if (oldValue !== value)
        {
            model_internal::_po_closed_dateIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_closed_dateIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get po_closed_dateIsValid():Boolean
    {
        if (!model_internal::_po_closed_dateIsValidCacheInitialized)
        {
            model_internal::calculatePo_closed_dateIsValid();
        }

        return model_internal::_po_closed_dateIsValid;
    }

    model_internal function calculatePo_closed_dateIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_po_closed_dateValidator.validate(model_internal::_instance.po_closed_date)
        model_internal::_po_closed_dateIsValid_der = (valRes.results == null);
        model_internal::_po_closed_dateIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::po_closed_dateValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::po_closed_dateValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get po_closed_dateValidationFailureMessages():Array
    {
        if (model_internal::_po_closed_dateValidationFailureMessages == null)
            model_internal::calculatePo_closed_dateIsValid();

        return _po_closed_dateValidationFailureMessages;
    }

    model_internal function set po_closed_dateValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_po_closed_dateValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_po_closed_dateValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_closed_dateValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get pro_taxStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_taxValidator() : StyleValidator
    {
        return model_internal::_pro_taxValidator;
    }

    model_internal function set _pro_taxIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_taxIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_taxIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_taxIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_taxIsValid():Boolean
    {
        if (!model_internal::_pro_taxIsValidCacheInitialized)
        {
            model_internal::calculatePro_taxIsValid();
        }

        return model_internal::_pro_taxIsValid;
    }

    model_internal function calculatePro_taxIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_taxValidator.validate(model_internal::_instance.pro_tax)
        model_internal::_pro_taxIsValid_der = (valRes.results == null);
        model_internal::_pro_taxIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_taxValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_taxValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_taxValidationFailureMessages():Array
    {
        if (model_internal::_pro_taxValidationFailureMessages == null)
            model_internal::calculatePro_taxIsValid();

        return _pro_taxValidationFailureMessages;
    }

    model_internal function set pro_taxValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_taxValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_taxValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_taxValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get cre_userid_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get po_remarksStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get po_remarksValidator() : StyleValidator
    {
        return model_internal::_po_remarksValidator;
    }

    model_internal function set _po_remarksIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_po_remarksIsValid;         
        if (oldValue !== value)
        {
            model_internal::_po_remarksIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_remarksIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get po_remarksIsValid():Boolean
    {
        if (!model_internal::_po_remarksIsValidCacheInitialized)
        {
            model_internal::calculatePo_remarksIsValid();
        }

        return model_internal::_po_remarksIsValid;
    }

    model_internal function calculatePo_remarksIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_po_remarksValidator.validate(model_internal::_instance.po_remarks)
        model_internal::_po_remarksIsValid_der = (valRes.results == null);
        model_internal::_po_remarksIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::po_remarksValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::po_remarksValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get po_remarksValidationFailureMessages():Array
    {
        if (model_internal::_po_remarksValidationFailureMessages == null)
            model_internal::calculatePo_remarksIsValid();

        return _po_remarksValidationFailureMessages;
    }

    model_internal function set po_remarksValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_po_remarksValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_po_remarksValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_remarksValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get po_amend_serialnumberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get unit_priceStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get unit_priceValidator() : StyleValidator
    {
        return model_internal::_unit_priceValidator;
    }

    model_internal function set _unit_priceIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_unit_priceIsValid;         
        if (oldValue !== value)
        {
            model_internal::_unit_priceIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "unit_priceIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get unit_priceIsValid():Boolean
    {
        if (!model_internal::_unit_priceIsValidCacheInitialized)
        {
            model_internal::calculateUnit_priceIsValid();
        }

        return model_internal::_unit_priceIsValid;
    }

    model_internal function calculateUnit_priceIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_unit_priceValidator.validate(model_internal::_instance.unit_price)
        model_internal::_unit_priceIsValid_der = (valRes.results == null);
        model_internal::_unit_priceIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::unit_priceValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::unit_priceValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get unit_priceValidationFailureMessages():Array
    {
        if (model_internal::_unit_priceValidationFailureMessages == null)
            model_internal::calculateUnit_priceIsValid();

        return _unit_priceValidationFailureMessages;
    }

    model_internal function set unit_priceValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_unit_priceValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_unit_priceValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "unit_priceValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get po_amend_detserialnumberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get po_amend_detserialnumberValidator() : StyleValidator
    {
        return model_internal::_po_amend_detserialnumberValidator;
    }

    model_internal function set _po_amend_detserialnumberIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_po_amend_detserialnumberIsValid;         
        if (oldValue !== value)
        {
            model_internal::_po_amend_detserialnumberIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_amend_detserialnumberIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get po_amend_detserialnumberIsValid():Boolean
    {
        if (!model_internal::_po_amend_detserialnumberIsValidCacheInitialized)
        {
            model_internal::calculatePo_amend_detserialnumberIsValid();
        }

        return model_internal::_po_amend_detserialnumberIsValid;
    }

    model_internal function calculatePo_amend_detserialnumberIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_po_amend_detserialnumberValidator.validate(model_internal::_instance.po_amend_detserialnumber)
        model_internal::_po_amend_detserialnumberIsValid_der = (valRes.results == null);
        model_internal::_po_amend_detserialnumberIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::po_amend_detserialnumberValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::po_amend_detserialnumberValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get po_amend_detserialnumberValidationFailureMessages():Array
    {
        if (model_internal::_po_amend_detserialnumberValidationFailureMessages == null)
            model_internal::calculatePo_amend_detserialnumberIsValid();

        return _po_amend_detserialnumberValidationFailureMessages;
    }

    model_internal function set po_amend_detserialnumberValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_po_amend_detserialnumberValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_po_amend_detserialnumberValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_amend_detserialnumberValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get po_issue_dateStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get po_issue_dateValidator() : StyleValidator
    {
        return model_internal::_po_issue_dateValidator;
    }

    model_internal function set _po_issue_dateIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_po_issue_dateIsValid;         
        if (oldValue !== value)
        {
            model_internal::_po_issue_dateIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_issue_dateIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get po_issue_dateIsValid():Boolean
    {
        if (!model_internal::_po_issue_dateIsValidCacheInitialized)
        {
            model_internal::calculatePo_issue_dateIsValid();
        }

        return model_internal::_po_issue_dateIsValid;
    }

    model_internal function calculatePo_issue_dateIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_po_issue_dateValidator.validate(model_internal::_instance.po_issue_date)
        model_internal::_po_issue_dateIsValid_der = (valRes.results == null);
        model_internal::_po_issue_dateIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::po_issue_dateValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::po_issue_dateValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get po_issue_dateValidationFailureMessages():Array
    {
        if (model_internal::_po_issue_dateValidationFailureMessages == null)
            model_internal::calculatePo_issue_dateIsValid();

        return _po_issue_dateValidationFailureMessages;
    }

    model_internal function set po_issue_dateValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_po_issue_dateValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_po_issue_dateValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_issue_dateValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get pro_qtyStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_qtyValidator() : StyleValidator
    {
        return model_internal::_pro_qtyValidator;
    }

    model_internal function set _pro_qtyIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_qtyIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_qtyIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_qtyIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_qtyIsValid():Boolean
    {
        if (!model_internal::_pro_qtyIsValidCacheInitialized)
        {
            model_internal::calculatePro_qtyIsValid();
        }

        return model_internal::_pro_qtyIsValid;
    }

    model_internal function calculatePro_qtyIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_qtyValidator.validate(model_internal::_instance.pro_qty)
        model_internal::_pro_qtyIsValid_der = (valRes.results == null);
        model_internal::_pro_qtyIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_qtyValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_qtyValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_qtyValidationFailureMessages():Array
    {
        if (model_internal::_pro_qtyValidationFailureMessages == null)
            model_internal::calculatePro_qtyIsValid();

        return _pro_qtyValidationFailureMessages;
    }

    model_internal function set pro_qtyValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_qtyValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_qtyValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_qtyValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get activestatusStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get total_amtStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get enq_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get enq_serialnumber_fkValidator() : StyleValidator
    {
        return model_internal::_enq_serialnumber_fkValidator;
    }

    model_internal function set _enq_serialnumber_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_enq_serialnumber_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_enq_serialnumber_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_serialnumber_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get enq_serialnumber_fkIsValid():Boolean
    {
        if (!model_internal::_enq_serialnumber_fkIsValidCacheInitialized)
        {
            model_internal::calculateEnq_serialnumber_fkIsValid();
        }

        return model_internal::_enq_serialnumber_fkIsValid;
    }

    model_internal function calculateEnq_serialnumber_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_enq_serialnumber_fkValidator.validate(model_internal::_instance.enq_serialnumber_fk)
        model_internal::_enq_serialnumber_fkIsValid_der = (valRes.results == null);
        model_internal::_enq_serialnumber_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::enq_serialnumber_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::enq_serialnumber_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get enq_serialnumber_fkValidationFailureMessages():Array
    {
        if (model_internal::_enq_serialnumber_fkValidationFailureMessages == null)
            model_internal::calculateEnq_serialnumber_fkIsValid();

        return _enq_serialnumber_fkValidationFailureMessages;
    }

    model_internal function set enq_serialnumber_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_enq_serialnumber_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_enq_serialnumber_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_serialnumber_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get po_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get po_amend_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get po_amend_serialnumber_fkValidator() : StyleValidator
    {
        return model_internal::_po_amend_serialnumber_fkValidator;
    }

    model_internal function set _po_amend_serialnumber_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_po_amend_serialnumber_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_po_amend_serialnumber_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_amend_serialnumber_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get po_amend_serialnumber_fkIsValid():Boolean
    {
        if (!model_internal::_po_amend_serialnumber_fkIsValidCacheInitialized)
        {
            model_internal::calculatePo_amend_serialnumber_fkIsValid();
        }

        return model_internal::_po_amend_serialnumber_fkIsValid;
    }

    model_internal function calculatePo_amend_serialnumber_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_po_amend_serialnumber_fkValidator.validate(model_internal::_instance.po_amend_serialnumber_fk)
        model_internal::_po_amend_serialnumber_fkIsValid_der = (valRes.results == null);
        model_internal::_po_amend_serialnumber_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::po_amend_serialnumber_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::po_amend_serialnumber_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get po_amend_serialnumber_fkValidationFailureMessages():Array
    {
        if (model_internal::_po_amend_serialnumber_fkValidationFailureMessages == null)
            model_internal::calculatePo_amend_serialnumber_fkIsValid();

        return _po_amend_serialnumber_fkValidationFailureMessages;
    }

    model_internal function set po_amend_serialnumber_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_po_amend_serialnumber_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_po_amend_serialnumber_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_amend_serialnumber_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get cre_datetimeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get cre_datetimeValidator() : StyleValidator
    {
        return model_internal::_cre_datetimeValidator;
    }

    model_internal function set _cre_datetimeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_cre_datetimeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_cre_datetimeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetimeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetimeIsValid():Boolean
    {
        if (!model_internal::_cre_datetimeIsValidCacheInitialized)
        {
            model_internal::calculateCre_datetimeIsValid();
        }

        return model_internal::_cre_datetimeIsValid;
    }

    model_internal function calculateCre_datetimeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_cre_datetimeValidator.validate(model_internal::_instance.cre_datetime)
        model_internal::_cre_datetimeIsValid_der = (valRes.results == null);
        model_internal::_cre_datetimeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::cre_datetimeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::cre_datetimeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetimeValidationFailureMessages():Array
    {
        if (model_internal::_cre_datetimeValidationFailureMessages == null)
            model_internal::calculateCre_datetimeIsValid();

        return _cre_datetimeValidationFailureMessages;
    }

    model_internal function set cre_datetimeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_cre_datetimeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_cre_datetimeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetimeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get po_statusStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get po_statusValidator() : StyleValidator
    {
        return model_internal::_po_statusValidator;
    }

    model_internal function set _po_statusIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_po_statusIsValid;         
        if (oldValue !== value)
        {
            model_internal::_po_statusIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_statusIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get po_statusIsValid():Boolean
    {
        if (!model_internal::_po_statusIsValidCacheInitialized)
        {
            model_internal::calculatePo_statusIsValid();
        }

        return model_internal::_po_statusIsValid;
    }

    model_internal function calculatePo_statusIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_po_statusValidator.validate(model_internal::_instance.po_status)
        model_internal::_po_statusIsValid_der = (valRes.results == null);
        model_internal::_po_statusIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::po_statusValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::po_statusValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get po_statusValidationFailureMessages():Array
    {
        if (model_internal::_po_statusValidationFailureMessages == null)
            model_internal::calculatePo_statusIsValid();

        return _po_statusValidationFailureMessages;
    }

    model_internal function set po_statusValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_po_statusValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_po_statusValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_statusValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get pro_total_priceStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_total_priceValidator() : StyleValidator
    {
        return model_internal::_pro_total_priceValidator;
    }

    model_internal function set _pro_total_priceIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_total_priceIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_total_priceIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_total_priceIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_total_priceIsValid():Boolean
    {
        if (!model_internal::_pro_total_priceIsValidCacheInitialized)
        {
            model_internal::calculatePro_total_priceIsValid();
        }

        return model_internal::_pro_total_priceIsValid;
    }

    model_internal function calculatePro_total_priceIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_total_priceValidator.validate(model_internal::_instance.pro_total_price)
        model_internal::_pro_total_priceIsValid_der = (valRes.results == null);
        model_internal::_pro_total_priceIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_total_priceValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_total_priceValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_total_priceValidationFailureMessages():Array
    {
        if (model_internal::_pro_total_priceValidationFailureMessages == null)
            model_internal::calculatePro_total_priceIsValid();

        return _pro_total_priceValidationFailureMessages;
    }

    model_internal function set pro_total_priceValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_total_priceValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_total_priceValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_total_priceValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get supplier_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get pro_serialnumber_fkStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_serialnumber_fkValidator() : StyleValidator
    {
        return model_internal::_pro_serialnumber_fkValidator;
    }

    model_internal function set _pro_serialnumber_fkIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_serialnumber_fkIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_serialnumber_fkIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fkIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fkIsValid():Boolean
    {
        if (!model_internal::_pro_serialnumber_fkIsValidCacheInitialized)
        {
            model_internal::calculatePro_serialnumber_fkIsValid();
        }

        return model_internal::_pro_serialnumber_fkIsValid;
    }

    model_internal function calculatePro_serialnumber_fkIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_serialnumber_fkValidator.validate(model_internal::_instance.pro_serialnumber_fk)
        model_internal::_pro_serialnumber_fkIsValid_der = (valRes.results == null);
        model_internal::_pro_serialnumber_fkIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_serialnumber_fkValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_serialnumber_fkValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fkValidationFailureMessages():Array
    {
        if (model_internal::_pro_serialnumber_fkValidationFailureMessages == null)
            model_internal::calculatePro_serialnumber_fkIsValid();

        return _pro_serialnumber_fkValidationFailureMessages;
    }

    model_internal function set pro_serialnumber_fkValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_serialnumber_fkValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_serialnumber_fkValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fkValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get discountStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get expected_datetimeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get expected_datetimeValidator() : StyleValidator
    {
        return model_internal::_expected_datetimeValidator;
    }

    model_internal function set _expected_datetimeIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_expected_datetimeIsValid;         
        if (oldValue !== value)
        {
            model_internal::_expected_datetimeIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "expected_datetimeIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get expected_datetimeIsValid():Boolean
    {
        if (!model_internal::_expected_datetimeIsValidCacheInitialized)
        {
            model_internal::calculateExpected_datetimeIsValid();
        }

        return model_internal::_expected_datetimeIsValid;
    }

    model_internal function calculateExpected_datetimeIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_expected_datetimeValidator.validate(model_internal::_instance.expected_datetime)
        model_internal::_expected_datetimeIsValid_der = (valRes.results == null);
        model_internal::_expected_datetimeIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::expected_datetimeValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::expected_datetimeValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get expected_datetimeValidationFailureMessages():Array
    {
        if (model_internal::_expected_datetimeValidationFailureMessages == null)
            model_internal::calculateExpected_datetimeIsValid();

        return _expected_datetimeValidationFailureMessages;
    }

    model_internal function set expected_datetimeValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_expected_datetimeValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_expected_datetimeValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "expected_datetimeValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get pro_discountStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get pro_discountValidator() : StyleValidator
    {
        return model_internal::_pro_discountValidator;
    }

    model_internal function set _pro_discountIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_pro_discountIsValid;         
        if (oldValue !== value)
        {
            model_internal::_pro_discountIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_discountIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get pro_discountIsValid():Boolean
    {
        if (!model_internal::_pro_discountIsValidCacheInitialized)
        {
            model_internal::calculatePro_discountIsValid();
        }

        return model_internal::_pro_discountIsValid;
    }

    model_internal function calculatePro_discountIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_pro_discountValidator.validate(model_internal::_instance.pro_discount)
        model_internal::_pro_discountIsValid_der = (valRes.results == null);
        model_internal::_pro_discountIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::pro_discountValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::pro_discountValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get pro_discountValidationFailureMessages():Array
    {
        if (model_internal::_pro_discountValidationFailureMessages == null)
            model_internal::calculatePro_discountIsValid();

        return _pro_discountValidationFailureMessages;
    }

    model_internal function set pro_discountValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_pro_discountValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_pro_discountValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_discountValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get taxStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get po_amend_idStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get po_amend_idValidator() : StyleValidator
    {
        return model_internal::_po_amend_idValidator;
    }

    model_internal function set _po_amend_idIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_po_amend_idIsValid;         
        if (oldValue !== value)
        {
            model_internal::_po_amend_idIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_amend_idIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get po_amend_idIsValid():Boolean
    {
        if (!model_internal::_po_amend_idIsValidCacheInitialized)
        {
            model_internal::calculatePo_amend_idIsValid();
        }

        return model_internal::_po_amend_idIsValid;
    }

    model_internal function calculatePo_amend_idIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_po_amend_idValidator.validate(model_internal::_instance.po_amend_id)
        model_internal::_po_amend_idIsValid_der = (valRes.results == null);
        model_internal::_po_amend_idIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::po_amend_idValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::po_amend_idValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get po_amend_idValidationFailureMessages():Array
    {
        if (model_internal::_po_amend_idValidationFailureMessages == null)
            model_internal::calculatePo_amend_idIsValid();

        return _po_amend_idValidationFailureMessages;
    }

    model_internal function set po_amend_idValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_po_amend_idValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_po_amend_idValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_amend_idValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get shipment_chargeStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    [Bindable(event="propertyChange")]   
    public function get enq_amend_po_serialnumberStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get enq_amend_po_serialnumberValidator() : StyleValidator
    {
        return model_internal::_enq_amend_po_serialnumberValidator;
    }

    model_internal function set _enq_amend_po_serialnumberIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_enq_amend_po_serialnumberIsValid;         
        if (oldValue !== value)
        {
            model_internal::_enq_amend_po_serialnumberIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_amend_po_serialnumberIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get enq_amend_po_serialnumberIsValid():Boolean
    {
        if (!model_internal::_enq_amend_po_serialnumberIsValidCacheInitialized)
        {
            model_internal::calculateEnq_amend_po_serialnumberIsValid();
        }

        return model_internal::_enq_amend_po_serialnumberIsValid;
    }

    model_internal function calculateEnq_amend_po_serialnumberIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_enq_amend_po_serialnumberValidator.validate(model_internal::_instance.enq_amend_po_serialnumber)
        model_internal::_enq_amend_po_serialnumberIsValid_der = (valRes.results == null);
        model_internal::_enq_amend_po_serialnumberIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::enq_amend_po_serialnumberValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::enq_amend_po_serialnumberValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get enq_amend_po_serialnumberValidationFailureMessages():Array
    {
        if (model_internal::_enq_amend_po_serialnumberValidationFailureMessages == null)
            model_internal::calculateEnq_amend_po_serialnumberIsValid();

        return _enq_amend_po_serialnumberValidationFailureMessages;
    }

    model_internal function set enq_amend_po_serialnumberValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_enq_amend_po_serialnumberValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_enq_amend_po_serialnumberValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "enq_amend_po_serialnumberValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("po_closed_date"):
            {
                return po_closed_dateValidationFailureMessages;
            }
            case("pro_tax"):
            {
                return pro_taxValidationFailureMessages;
            }
            case("po_remarks"):
            {
                return po_remarksValidationFailureMessages;
            }
            case("unit_price"):
            {
                return unit_priceValidationFailureMessages;
            }
            case("po_amend_detserialnumber"):
            {
                return po_amend_detserialnumberValidationFailureMessages;
            }
            case("po_issue_date"):
            {
                return po_issue_dateValidationFailureMessages;
            }
            case("pro_qty"):
            {
                return pro_qtyValidationFailureMessages;
            }
            case("enq_serialnumber_fk"):
            {
                return enq_serialnumber_fkValidationFailureMessages;
            }
            case("po_amend_serialnumber_fk"):
            {
                return po_amend_serialnumber_fkValidationFailureMessages;
            }
            case("cre_datetime"):
            {
                return cre_datetimeValidationFailureMessages;
            }
            case("po_status"):
            {
                return po_statusValidationFailureMessages;
            }
            case("pro_total_price"):
            {
                return pro_total_priceValidationFailureMessages;
            }
            case("pro_serialnumber_fk"):
            {
                return pro_serialnumber_fkValidationFailureMessages;
            }
            case("expected_datetime"):
            {
                return expected_datetimeValidationFailureMessages;
            }
            case("pro_discount"):
            {
                return pro_discountValidationFailureMessages;
            }
            case("po_amend_id"):
            {
                return po_amend_idValidationFailureMessages;
            }
            case("enq_amend_po_serialnumber"):
            {
                return enq_amend_po_serialnumberValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
